import re
strs = "fsadfsadfsadfsdafsadfsdafsdafsdafsdfgggsg2g121gfd12g1g4r5e4gr5452qwr15eth1h"
pat = r"sg(.*?)4r5e"

res = re.findall(pat,strs)[0]
print(res)